From acfc3f80c0cbee472105a157571f18874e960c91 Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Wed, 14 Sep 2005 15:25:28 +0000 Subject: [PATCH] Move name back into main domain dir. Signed-off-by: Christian Limpach --- tools/python/xen/xend/XendDomainInfo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index e6a3349bd7..2964e1e5e0 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -149,6 +149,7 @@ class XendDomainInfo: path = "/".join(db.getPath().split("/")[0:-2]) vm = cls(uuid, path, db) vm.setDomid(domid) + vm.name = vm.readStore("name") try: db.readDB() except: pass @@ -202,7 +203,6 @@ class XendDomainInfo: restore = classmethod(restore) __exports__ = [ - DBVar('name', ty='str'), DBVar('config', ty='sxpr'), DBVar('start_time', ty='float'), DBVar('state', ty='str'), @@ -264,6 +264,9 @@ class XendDomainInfo: xstransact.Write(self.path, "uuid", self.uuid) + def readStore(self, key): + return xstransact.Read(self.path, key) + def setDB(self, db): self.db = db @@ -292,7 +295,7 @@ class XendDomainInfo: def setName(self, name): self.name = name - self.db.name = self.name + xstransact.Write(self.path, "name", name) def getName(self): return self.name -- 2.30.2